package com.example.user_module.arouterservice;

import android.content.Context;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.blankj.utilcode.util.SPUtils;
import com.example.common.providerservice.CheckLoginApi;

@Route(path = "/user/CheckLoginImpl",name = "获取用户登录校验")
public class CheckLoginImpl implements CheckLoginApi {
    private long userId=0;
    @Override
    public void setUserId(long userId) {
        this.userId=userId;
    }

    @Override
    public boolean checkLogin() {
        userId = SPUtils.getInstance().getLong("userid",0);
        return userId!=0;
    }

    @Override
    public long geUserId() {
        userId = SPUtils.getInstance().getLong("userid",0);
        return userId;
    }

    @Override
    public void init(Context context) {

    }
}
